﻿using Microsoft.Extensions.Options;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _05_Options
{
    internal class MvcOptionsPostConfigureOptions : IPostConfigureOptions<MvcOptions>
    {
        public void PostConfigure(string name, MvcOptions options)
        {
            options.Url = "666";
            //可以编写验证逻辑
            //if (options.Url == "123")
            //{
            //    throw new InvalidDataException("Url不能等于123");
            //}
        }
    }
}
